<?php 
/**
 * Parameters
 * @param $member Member Current Member
 * @param $phone_numbers_landline array Array with landline phone numbers
 * @param $phone_numbers_fax array Array with fax numbers
 * @param $phone_numbers_mobile array Array with mobile phone numbers
 */
?>
<?php use_helper('Date'); ?>
<?php slot('heading', $member->getFirstName().' '.$member->getLastName())?>
<?php slot('breadcrumb1', link_to('Mitglieder', 'organizational_unit_portal', $member->getOrganizationalUnit()));?>
<?php slot('breadcrumb2', 'Profil anzeigen');?>
<?php slot('current_nav_tab', 'member');?>

		<form action="#" method="post" class="form uniform label-top">
			
			<div class="x8">
				
				<div class="tab_container">
					<ul class="tabs">
						<li><a href="#profil_stammdaten">Stammdaten</a></li>
						<li><a href="#profil_kontaktdaten">Kontaktdaten</a></li>
						<li><a href="#profil_pfadfinderdaten">Pfadfinderdaten</a></li>
						<li><a href="#profil_kontodaten">Kontodaten</a></li>
					</ul>
					
					<div class="tab_content_container">
						
						<div id="profil_stammdaten" class="tab_content">
							<div class="field stammdaten_vorname">
								<label for="vorname">Vorname</label>
								<span><?php echo $member->getFirstName();?></span>
							</div>
							<div class="field stammdaten_nachname">
								<label for="nachname">Nachname</label>
								<span><?php echo $member->getLastName();?></span>
							</div>
							<div class="field stammdaten_geschlecht">
								<label for="geschlecht">Geschlecht</label>
								<span><?php include_partial('member/gender_icon', array('member' => $member));?></span>
							</div>
							<div class="field adresse_3">
								<label for="geburtstag">Geburtstag</label>
								<span>
								<?php if($member->getPersonalData()->rawGet('date_of_birth')):?>
								    <?php echo $member->getDateOfBirth()->format('d.m.Y');?>
								<?php else:?>&nbsp;<?php endif;?>
								</span>
							</div>
							<div class="field adresse_4">
								<label for="geburtsort">Geburtsort</label>
								<span><?php echo $member->getBirthplace();?></span>
							</div>
							<div class="field">
								<label for="strasse">Stra&szlig;e & Hausnummer</label>
								<span style="float: left; width: 566px;"><?php echo $member->getFirstAddress()->getStreet();?> <?php echo $member->getFirstAddress()->getStreetNumber();?></span>
							</div>
							<div class="field adresse_3">
								<label for="plz">PLZ</label>
								<span><?php echo $member->getFirstAddress()->getZipCode();?></span>
							</div>
							<div class="field adresse_4">
								<label for="ort">Ort</label>
								<span><?php echo $member->getFirstAddress()->getCity();?></span>
							</div>
							<div class="field">
								<label for="land" class="">Land</label>
								<span style="float: left; width: 566px;"><?php echo $member->getFirstAddress()->getCountry()->getName();?></span>
							</div>
						</div>
						
						<div id="profil_kontaktdaten" class="tab_content">
							<?php foreach($phone_numbers_landline as $i => $phone_number):?>
							<div class="field">
								<label for="telefon1_vorwahl">Festnetz #<?php echo $i+1?></label>
								<span style="float: left; width: 566px;">(0) <?php echo $phone_number->getAreaCode();?> / <?php echo $phone_number->getCallThrough();?></span>
							</div>
							<?php endforeach;?>
							
							<?php foreach($phone_numbers_fax as $i => $phone_number):?>
							<div class="field">
								<label for="telefon1_vorwahl">Fax #<?php echo $i+1?></label>
								<span style="float: left; width: 566px;">(0) <?php echo $phone_number->getAreaCode();?> / <?php echo $phone_number->getCallThrough();?></span>
							</div>
							<?php endforeach;?>
							
							<?php foreach($phone_numbers_mobile as $i => $phone_number):?>
							<div class="field">
								<label for="telefon1_vorwahl">Handy #<?php echo $i+1?></label>
								<span style="float: left; width: 566px;">(0) <?php echo $phone_number->getAreaCode();?> / <?php echo $phone_number->getCallThrough();?></span>
							</div>
							<?php endforeach;?>
						</div>
						
						<div id="profil_pfadfinderdaten" class="tab_content">
							<div class="field stammdaten_vorname">
								<label for="eintrittsdatum">Eintrittsdatum</label>
								<span>
								<?php if($member->getOrganizationalData()->rawGet('date_of_joining')):?>
								    <?php echo $member->getDateOfJoining()->format('d.m.Y')?>
								<?php else:?>&nbsp;<?php endif;?>
								</span>
							</div>
							<div class="field stammdaten_nachname">
								<label for="austrittsdatum">Austrittsdatum</label>
								<span>
								<?php if($member->getOrganizationalData()->rawGet('date_of_resignation')):?>
								    <?php echo $member->getDateOfResignation()->format('d.m.Y')?>
								<?php else:?>&nbsp;<?php endif;?>
								</span>
							</div>
							<div class="field stufe">
								<label>Stufe</label>
								<span><?php echo $member->getAgeGroup()->getName()?></span>
							</div>
							<div class="field gruppe">
								<label>Zugehörigkeit</label>
								<span><?php echo $member->getOrganizationalUnit()->getName()?></span>
							</div>
							<div class="field halstuch">
								<label>Halstuch</label>
								<span><?php echo ($member->hasScarf() ? 'ja' : 'nein');?></span>
							</div>
							<div class="field knotenschild">
								<label>Knotenschild</label>
								<span><?php echo $member->getWoggle()->getName()?></span>
							</div>
						</div>
						
						<div id="profil_kontodaten" class="tab_content">
							<div class="field">
								<label>Kontoinhaber</label>
								<span><?php echo $member->getBankAccount()->getOwner()?></span>
							</div>
							<div class="field">
								<label>Kontonummer</label>
								<span><?php echo $member->getBankAccount()->getNumber()?></span>
							</div>
							<div class="field">
								<label>Bankleitzahl</label>
								<span><?php echo $member->getBankAccount()->getBankCode()?></span>
							</div>
							<div class="field">
								<label>Bank</label>
								<span><?php echo $member->getBankAccount()->getBank()?></span>
							</div>
						</div>
					
					</div>
				
				</div>
			
			</div>
			
			<div class="x4">
				<h2 class="box">Werkzeugbox<img alt="Werkzeugbox" src="<?php echo image_path('icons/content_werkzeugbox.png');?>" /></h2>
				<table class="box_table subnavigation">
					<tbody>
						<tr>
							<td><a href="<?php echo url_for('member_edit', array('sf_subject' => $member, 'unit' => $member->getOrganizationalUnit()));?>"><img alt="Mitglied bearbeiten" src="<?php echo image_path('icons/content_subnavigation_bearbeiten.png');?>" />Mitglied bearbeiten</a></td>
						</tr>
					</tbody>
				</table>
			</div>
			
		</form>